<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE9" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<SCRIPT LANGUAGE="JavaScript1.2"> 
adTime=parent.adsTime; 

chanceAd=1;
var ns=(document.layers);
var ie=(document.all);
var w3=(document.getElementById  &&  !ie);
adCount=0;
function initAd(){
        if(!ns  &&  !ie  &&  !w3) return;
        if(ie)             adDiv=eval('document.all.sponsorAdDiv.style');
        else if(ns)        adDiv=eval('document.layers["sponsorAdDiv"]');
        else if(w3)        adDiv=eval('document.getElementById("sponsorAdDiv").style');
        randAd=Math.ceil(Math.random()*chanceAd);
        if (ie||w3)
        adDiv.visibility="visible";
        else
        adDiv.visibility ="show";
        if(randAd==1) showAd();
		document.getElementById("zzzif").src=parent.adsPage; 
		document.getElementById("zzzif").height=parent.playerh;
		document.getElementById("zzzif").width=parent.playerw; 		
}
function showAd(){
if(adCount<adTime*10){adCount+=1;
        if (ie){documentWidth  =document.body.offsetWidth/2+document.body.scrollLeft-20;
        documentHeight =document.body.offsetHeight/2+document.body.scrollTop-20;}
        else if (ns){documentWidth=window.innerWidth/2+window.pageXOffset-20;
        documentHeight=window.innerHeight/2+window.pageYOffset-20;}
        else if (w3){documentWidth=self.innerWidth/2+window.pageXOffset-20;
        documentHeight=self.innerHeight/2+window.pageYOffset-20;}
        adDiv.left=documentWidth-200;adDiv.top =documentHeight-200;
        setTimeout("showAd()",100);}else closeAd();
}
function closeAd(){
if (ie||w3)
adDiv.display="none";
else
adDiv.visibility ="hide";
}
onload=initAd;
</script>
<style> 
a{text-decoration:none;color:#aaa;} 
a:link{text-decoration:none;color:#aaa;} 
a:hover{text-decoration:none;color:#aaa;} 
a:active{text-decoration:none;color:#aaa;} 
a:visited{text-decoration:none;color:#aaa;} 
</style> 
</head>
<body style="margin:0px;padding:0px;">
<div id="sponsorAdDiv" style="visibility:hidden; z-index:999; height:105%; width:100%;">
<iframe id="zzzif" name="zzzif" src="" scrolling="no" frameborder="0"></iframe>
</div>
<div id="player"></div>

<script>

//可选配置
var oncolor="#3ea23d";   //选中颜色
var ontext="▶";       //选中附加文本

//生成解析数组,方便后续操作
var jxname=new Array(5);
var jxapi=new Array(5);

for(i=0;i<5;i++)
 {
switch (i)
{
case 0:
    jxname[0]=parent.jxAname;
	jxapi[0]=parent.jxAapi;
    break;
case 1:
    jxname[1]=parent.jxBname;
	jxapi[1]=parent.jxBapi;
	break;
case 2:
    jxname[2]=parent.jxCname;
	jxapi[2]=parent.jxCapi;
   break;
case 3:
  jxname[3]=parent.jxDname;
	jxapi[3]=parent.jxDapi;
  break;
case 4:
   jxname[4]=parent.jxEname;
   jxapi[4]=parent.jxEapi;
  break;
}
 
}

//获取并设置解析
var jxnum=Number(localStorage.getItem("jxnum"));

//设置缓存及选行选中项
 function col(num)
{
//删除原选中项
var x=document.getElementById("jx"+jxnum);x.style.color="#aaa";x.innerHTML=jxname[jxnum];
//设置选行选中项
var x=document.getElementById("jx"+num);x.style.color=oncolor;x.innerHTML=jxname[num]+ontext;
//更新缓存
jxnum=num;localStorage.setItem("jxnum", num);
 }

var playerh=parent.playerh;
if(playerh !='100%'){playerh=playerh-25}

document.getElementById('player').innerHTML  = '<div style="height:26px; background-color:#2E2E2E; line-height:26px; color:#aaa;">&nbsp;&nbsp;&nbsp;线路切换：&nbsp;&nbsp;&nbsp;<a  id="jx0"  target="zzapi"  href="'+parent.jxAapi+parent.now+'" onclick="col(0);"><font style="color:#aaa">'+parent.jxAname+'</font></a> &nbsp;&nbsp;&nbsp;<a id="jx1" target="zzapi"  href="'+parent.jxBapi+parent.now+'" onclick="col(1);" ><font style="color:#aaa">'+parent.jxBname+'</font></a>&nbsp;&nbsp;&nbsp;<a id="jx2" target="zzapi"  href="'+parent.jxCapi+parent.now+'" onclick="col(2);" ><font style="color:#aaa">'+parent.jxCname+'</font></a> &nbsp;&nbsp;&nbsp;<a id="jx3" target="zzapi"  href="'+parent.jxDapi+parent.now+'" onclick="col(3);"><font style="color:#aaa">'+parent.jxDname+'</font></a> &nbsp;&nbsp;&nbsp;<a id="jx4" target="zzapi"  href="'+parent.jxEapi+parent.now+'" onclick="col(4);" ><font style="color:#aaa">'+parent.jxEname+'</font></a> </div><iframe name="zzapi" id="zzapi" src="'+jxapi[jxnum]+parent.now+'" scrolling="0" frameborder="0" width="100%" height="'+playerh+'" allowfullscreen="allowfullscreen" mozallowfullscreen="mozallowfullscreen" msallowfullscreen="msallowfullscreen" oallowfullscreen="oallowfullscreen" webkitallowfullscreen="webkitallowfullscreen"></iframe>';
var x=document.getElementById("jx"+jxnum);x.innerHTML=jxname[jxnum]+ontext;x.style.color=oncolor;
</script>   
</body>
</html>